﻿using RepositoryAndEf.Domain;
using System.Data.Entity.ModelConfiguration;

namespace RepositoryAndEf.Data.Mapping
{
    public class ShoppingCartItemMap : EntityTypeConfiguration<ShoppingCartItem>
    {
        public ShoppingCartItemMap()
        {
            ToTable("ShoppingCartItems")
               .HasKey(c => c.Id)
               .HasRequired(c => c.Product).WithOptional();
        }
    }
}
